package com.boco.webmaster.base;

import org.apache.struts.validator.ValidatorForm;
import org.apache.struts.action.ActionErrors;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionMapping;

public abstract class WMValidatorForm extends ValidatorForm{
    public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
        ActionErrors errors = super.validate(mapping, request);
        if (errors == null) {
            errors = new ActionErrors();
        }

        formValidate(errors, mapping, request);
        return errors;
    }

   public abstract void formValidate(ActionErrors errors,
                                     ActionMapping mapping,
                                     HttpServletRequest request);
}
